/**
 * File: ByteArrayRandomAccessStream.java
 * Created by: mhaimel
 * Created on: Aug 1, 2011
 * CVS:  $Id: ByteArrayRandomAccessStream.java 1.0 Aug 1, 2011 5:06:49 PM mhaimel Exp $
 */
package uk.ac.ebi.curtain.storage.sequence;

import java.io.ByteArrayInputStream;
import java.io.IOException;

/**
 * @author mhaimel
 *
 */
public class ByteArrayRandomAccessStream extends ByteArrayInputStream implements InputRandomAccessStream {
	
	public ByteArrayRandomAccessStream(byte[] buf) {
		super(buf);
	}

	public void seek(long pos) throws IOException {
		this.pos = (int) pos;
	}

	public long length() {
		return (long) this.count;
	}
}
